<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页导航</title>
</head>

<body>
<h1 style="text-align: center; margin: 20px 0;">量化数据</h1>
<div class="navigation">
  <!-- 这里可以添加更多图标 -->
  <div class="nav-item">
    <%= link_to({ controller: 'aistock', action: 'trade_review' }) do %>
      <%= image_tag 'trade_review.png', alt: '图标1', class: 'nav-icon' %>
      <p>每日复盘</p>
    <% end %>
  </div>
  <div class="nav-item">
    <%= link_to({ controller: 'aistock', action: 'limit_lists' }) do %>
      <%= image_tag 'limits_list.png', alt: '图标1', class: 'nav-icon' %>
      <p>连板天梯</p>
    <% end %>
    <p>图标2</p>

  </div>
  <div class="nav-item">
    <p>图标3</p>
  </div>
  <div class="nav-item">
    <p>图标4</p>
  </div>
  <div class="nav-item">
    <p>图标5</p>
  </div>
  <div class="nav-item">
    <p>图标6</p>
  </div>
  <div class="nav-item">
    <p>图标7</p>
  </div>
  <div class="nav-item">
    <p>图标8</p>
  </div>
</div>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }

    .navigation {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        padding: 20px;
    }

    .nav-item {
        width: 25%; /* 每行显示4个图标 */
        text-align: center;
        margin-bottom: 20px;

    }
    .nav-item a {
        text-decoration: none;
        color: inherit;
        display: inline-block;
        width: 100%;
        height: 100%;
    }
    .nav-item img {
        width: 50px;
        height: 50px;
    }

    @media (max-width: 768px) {
        .nav-item {
            width: 50%; /* 手机模式下每行显示2个图标 */
        }
    }
</style>
</body>

</html>
